package com.sunjob.mroresource.service.impl;

import com.sunjob.common.domain.resource.ToolEntity;
import com.sunjob.common.util.MROUtils;
import com.sunjob.mroresource.mapper.ToolMapper;
import com.sunjob.mroresource.service.ToolService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;

@Service
public class ToolServiceImpl implements ToolService {

    @Resource
    private ToolMapper toolMapper;

    @Override
    public int addTool(ToolEntity toolEntity) {
        //使用自动生成Id
        toolEntity.setId(MROUtils.nextId());
        return toolMapper.addTool(toolEntity);
    }


    @Override
    public int deletetool (long status_id) {
        return toolMapper.deletetool(status_id);
    }

    @Override
    public int uqdatetool(long status_id) {
        return toolMapper.uqdatetool(status_id);
    }

    @Override
    public List<ToolEntity> listTool() {
        return toolMapper.liasTool();
    }

    @Override
    public List<ToolEntity> listtoolId(ToolEntity toolEntity) {
        return toolMapper.listtoolId(toolEntity);
    }

    @Override
    public List<ToolEntity> listtoolname(ToolEntity toolEntity) {
        return toolMapper.listtoolName(toolEntity);
    }

    @Override
    public List<ToolEntity> listtoolmodel(ToolEntity toolEntity) {
        return toolMapper.listtoolModel(toolEntity);
    }

    @Override
    public List<ToolEntity> listtoolstorearea() {
        return null;
    }

    @Override
    public Object listtoolvender() {
        return toolMapper.listtoolStorearea();
    }

    @Override
    public Object listtoolarea() {
        return toolMapper.listtoolVender();
    }

    @Override
    public Object listtoolspecies_id() {
        return toolMapper.listtoolspecies_id();
    }

    @Override
    public Object listtoolvehicletype() {
        return toolMapper.listtoolvehicletype();
    }

}
